a = {9, 10, 5, 6}  # 与字典一样，都是“{}“，但集合只包含键，没有值
print(a)
print(type(a))

try:
    a = {9, 10, 5, [6]}  # 键必须不可变
except TypeError as e:
    print(e)

b = [9, 10, 9, 10, 9, 10]
print(b)
c = set(b)
print(c)

d = {1, 2, 4, 5, 6, 9, 10, 11, 12, 13, 13, 13, 13}
print(d)  # 结果为{1, 2, 4, 5, 6, 9, 10, 11, 12, 13}
print(2 in d)  # 结果为True
print(3 in d)  # 结果为False

d1 = {17}
print(d | d1)  # 并，结果为 {1, 2, 4, 5, 6, 9, 10, 11, 12, 13, 17}
d2 = {13, 12, 11, 20}
print(d & d2)  # 交，结果为{11, 12, 13}
print(d ^ d2)  # 对称差 #相同的扔掉，剩下的并在一起。结果为{1, 2, 4, 5, 6, 9, 10, 20}
